import request from '@/utils/request'

// 查询食品配料列表
export function listFoodraw(query) {
  return request({
    url: '/system/foodraw/list',
    method: 'get',
    params: query
  })
}

// 查询食品配料详细
export function getFoodraw(id) {
  return request({
    url: '/system/foodraw/' + id,
    method: 'get'
  })
}

// 新增食品配料
export function addFoodraw(data) {
  return request({
    url: '/system/foodraw',
    method: 'post',
    data: data
  })
}

// 修改食品配料
export function updateFoodraw(data) {
  return request({
    url: '/system/foodraw',
    method: 'put',
    data: data
  })
}

// 删除食品配料
export function delFoodraw(id) {
  return request({
    url: '/system/foodraw/' + id,
    method: 'delete'
  })
}
